package com.blb.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.blb.entity.Comimg;
import com.blb.mapper.ComimgMapper;
import com.blb.service.IComimgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author txy
 * @since 2019-07-11
 */
@Service
public class ComimgServiceImpl extends ServiceImpl<ComimgMapper, Comimg> implements IComimgService {

    @Autowired
    private ComimgMapper comimgMapper;

    /**
     * 根据商品id查询商品详细图片
     *
     * @param comId
     * @return
     */
    @Override
    public List<Comimg> getComimgById(String comId) {
        List<Comimg> comimgs = comimgMapper.selectList(new QueryWrapper<Comimg>().eq("com_id", comId));
        return comimgs;
    }
}
